//
//  KSTimeFormatter.h
//  INMOTION
//
//  Created by Kyle on 3/24/15.
//  Copyright (c) 2015 Inmotion. All rights reserved.
//

#import <Foundation/Foundation.h>

extern NSString * const kKSTimeFormatLong;
extern NSString * const kKSTimeFormatVeryLong;
extern NSString * const kKSTimeFormatMedium;
extern NSString * const kKSTimeFormatShort;
extern NSString * const kKSTimeFormatServer;
extern NSString * const kKSTimeFormatClose;
extern NSString * const kKSTimeFormatCloseLong;
extern NSString * const kKSTimeFormatBirthday;

@interface KSTimeFormatter : NSObject

// 返回当前时间的年月日时分秒
+ (NSArray *)returnNowTimeForAryWithdate:(NSDate *)date;
//转换为短时间
+ (NSString *)niceStringForServerTime:(NSString *)time;
+ (NSString *)niceStringForDate:(NSDate *)date;

//时间戳转字符串
+ (NSString *)stringForTimeInterval:(NSTimeInterval)time andFormat:(NSString *)format;

//时间对象转字符串
+ (NSString *)stringForDate:(NSDate *)date andFormat:(NSString *)format;

//服务器时间转字符串
+ (NSString *)stringForServerTime:(NSString *)time andFormat:(NSString *)format;

//服务器时间获取时间戳
+ (NSTimeInterval)timeIntervalForServerTime:(NSString *)time;

//服务器时间获取日期对象
+ (NSDate *)dateForServerTime:(NSString *)time;

//某格式的时间获取日期对象
+ (NSDate *)dataForTime:(NSString *)time andFormat:(NSString *)format;

//获取时间的服务器格式
+ (NSString *)serverTimeForDate:(NSDate *)date ;

@end
